var fs = require("fs");
var path = require("path");
const dlutil = require("./elec/download2.js")
var path = "C:/Users/flyswatter/Desktop/test/dltest"
// dlutil.clearDir(path);
// dlutil.initDlInfo(path,"http://demo.mxyhn.xyz/cssthemes6/1.10ZF14/javascript:void(0);")
dlutil.initDlInfo(path,"http://demo.mxyhn.xyz/cssthemes6/1123zh3/index.html")

// let str = 'https://baidu.com:8080/p/a/t/h?id=1&name=美女';
// let url = require('url');
// var urlinfo = url.parse(str);
// console.log(url.parse(str, true));

// var prepath = "https://demosc.chinaz.net/Files/DownLoad/moban/202001/moban4370/"
// var file = "/js/jquery.js"
// console.log(	path.isAbsolute("https://demosc.chinaz.net/Files/DownLoad/moban/202001/moban4370/index.html"))
// console.log("->"+path.extname('https://demosc.chinaz.net/Files/DownLoad/moban/202001/moban4370'));
// console.log(path.join(urlinfo.path,file))